import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/layout'
Vue.use(VueRouter)
const routes = [
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },

  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  },
  {
    path: '/',
    component: Layout,
    redirect: '/main',
    children: [{
      path: '/main',
      name: 'main',
      component: () => import('@/views/main/index'),
      meta: { title: 'main', icon: 'el-icon-s-home' }
    }]
  },
  {
    path: '*',
    component: () => import('@/views/404'),
    hidden: true
  }
]

const router = new VueRouter({
  routes
})

export default router
